<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>个人信息</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">

		<link rel="stylesheet" href="css/mui.min.css">
		<link rel="stylesheet" href="css/mui.picker.css">
		<link href="css/mui.poppicker.css" rel="stylesheet" />
		<style>
			html,
			body {
				background-color: #efeff4;
			}
			.mui-views,
			.mui-view,
			.mui-pages,
			.mui-page,
			.mui-page-content {
				position: absolute;
				left: 0;
				right: 0;
				top: 0;
				bottom: 0;
				width: 100%;
				height: 100%;
				background-color: #efeff4;
			}
			.mui-pages {
				top: 46px;
				height: auto;
			}
			.mui-scroll-wrapper,
			.mui-scroll {
				background-color: #efeff4;
			}
			.mui-page.mui-transitioning {
				-webkit-transition: -webkit-transform 300ms ease;
				transition: transform 300ms ease;
			}
			.mui-page-left {
				-webkit-transform: translate3d(0, 0, 0);
				transform: translate3d(0, 0, 0);
			}
			.mui-ios .mui-page-left {
				-webkit-transform: translate3d(-20%, 0, 0);
				transform: translate3d(-20%, 0, 0);
			}
			.mui-navbar {
				position: fixed;
				right: 0;
				left: 0;
				z-index: 10;
				height: 44px;
				background-color: #f7f7f8;
			}
			.mui-navbar .mui-bar {
				position: absolute;
				background: transparent;
				text-align: center;
			}
			.mui-android .mui-navbar-inner.mui-navbar-left {
				opacity: 0;
			}
			.mui-ios .mui-navbar-left .mui-left,
			.mui-ios .mui-navbar-left .mui-center,
			.mui-ios .mui-navbar-left .mui-right {
				opacity: 0;
			}
			.mui-navbar .mui-btn-nav {
				-webkit-transition: none;
				transition: none;
				-webkit-transition-duration: .0s;
				transition-duration: .0s;
			}
			.mui-navbar .mui-bar .mui-title {
				display: inline-block;
				width: auto;
			}
			.mui-page-shadow {
				position: absolute;
				right: 100%;
				top: 0;
				width: 16px;
				height: 100%;
				z-index: -1;
				content: '';
			}
			.mui-page-shadow {
				background: -webkit-linear-gradient(left, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0) 10%, rgba(0, 0, 0, .01) 50%, rgba(0, 0, 0, .2) 100%);
				background: linear-gradient(to right, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0) 10%, rgba(0, 0, 0, .01) 50%, rgba(0, 0, 0, .2) 100%);
			}
			.mui-navbar-inner.mui-transitioning,
			.mui-navbar-inner .mui-transitioning {
				-webkit-transition: opacity 300ms ease, -webkit-transform 300ms ease;
				transition: opacity 300ms ease, transform 300ms ease;
			}
			.mui-page {
				display: none;
			}
			.mui-pages .mui-page {
				display: block;
			}
			.mui-page .mui-table-view:first-child {
				margin-top: 15px;
			}
			.mui-page .mui-table-view:last-child {
				margin-bottom: 0.5rem;
			}
			.mui-table-view {
				margin-top: 0.5rem;
			}
			
			.mui-table-view span.mui-pull-right {
				color: #999;
			}
			.mui-table-view-divider {
				background-color: #efeff4;
				font-size: 14px;
			}
			.mui-table-view-divider:before,
			.mui-table-view-divider:after {
				height: 0;
			}
			.head {
				height: 40px;
			}
			#head {
				line-height: 40px;
				color: #525252;
			}
			.head-img {
				width: 40px;
				height: 40px;
			}
			#head-img1 {
				position: absolute;
				top: 0;
				left: 5px;
			}
			.update {
				font-style: normal;
				color: #999999;
				margin-right: -25px;
				font-size: 15px
			}
			.mui-fullscreen {
				position: fixed;
				z-index: 20;
				background-color: #000;
			}
			.mui-ios .mui-navbar .mui-bar .mui-title {
				position: static;
			}
			/*问题反馈在setting页面单独的css*/
			#feedback .mui-popover{
				position: fixed;
			}
			#feedback .mui-table-view:last-child {
			    margin-bottom: 0px;
			}
			#feedback .mui-table-view:first-child {
			    margin-top: 0px;
			}
			/*问题反馈在setting页面单独的css==end*/
			.preservation{
				display: block;
			    position: fixed;
			    top: 0;
			    right: 0rem;
			    width: 4rem;
			    height: 3rem;
			    z-index: 9;
			    border: 0;
			    color: #fff;
    			font-size: 1rem;
			    background: #3EBDF5;
			}
			.mui-navbar .mui-bar,.mui-pull-left_style{
			    background: #3EBDF5;
			    height: 3rem;
			}
			.mui-title_fff{
				color: #fff;
				height: 3rem;
    			line-height: 3rem;
    			font-size: 1rem;
			}
			.mui-bar .mui-btn-link {
			    color: #fff;
			}
			.mui-icon-left-nav>img{
				padding: 6px 12px;
			    width: 2.9rem;
			    margin-top: 0.3rem;
			}
			#head-img{
				border-radius: 100%;
				float: right;
			}
			.mui-media-body{
				height: 2.63rem;
    			line-height: 2.9rem;
    			font-size: 0.8rem;
				float: left;
				color: #525252;
			}
			:after{
			    right: 3.2rem;
			}
			.mui-table-view-chevron .mui-table-view-cell>a:not(.mui-btn) {
			    margin-right: -6.5rem;
			}
			.mui-page .mui-table-view:first-child {
			    margin-top: 0;
			}
			.mui-table-view-cell:after {
			    background-color: #ebebeb;
			}
			.modify_input{
				width: 95%;
			    margin: 0 auto;
			    background: #efeff4;
			}
			.modify_input>li{
				border-radius: 0.4rem;
			    background: #fbfbfb;
			    padding: 0;
    			margin-top: 1rem;
			}
			.modify_input>li>input{
				border-radius: 0.4rem;
    			margin-bottom: 0px;
    			color: #c2c2c2;
    			font-size: 0.8rem;
			}
			.modify_input:after,.modify_input:before{
			    height: 0px;
			}
			#head-img1{
			    border-radius: 100%;
			    right: 0;
			    top: 0;
			    width: 5rem;
			    height: 5rem;
			    margin-left: 5px;
			}
			.mui-pull-right_name{
				height: 2.63rem;
    			line-height: 2.9rem;
    			font-size: 0.8rem;
    			float: right;
    			color: #a4a4a4;
			}
			.right_name_head-img1{
				width: 5rem;
			    height: 5rem;
			    margin: 0 auto;
			    float: none;
			    position: relative;
			}
			.modify_username{
				width: 90% !important;
			    border: 0 !important;
			    text-align: right !important;
			    margin-bottom: 0 !important;
			    font-size: 1rem !important;
    			color: #a4a4a4;
			}
			.mui-pull-right_10{
				margin-right: 0.25rem;
			}
			.mui-btn-blue, .mui-btn-primary, input[type=submit] {
			    border: 1px solid #3EBDF5;
			    background-color: #3EBDF5;
			}
			center>button{
				width: 85%;
			    margin-top: 1.5rem;
			    margin-bottom: 1rem;
			    border-radius: 3rem;
			    background: #53b0ff;
			    color: #fff;
			    border: 0;
			    font-size: 0.8rem;
			}
		</style>
		<link rel="stylesheet" type="text/css" href="css/feedback.css" />
	</head>

	<body class="mui-fullscreen">
		<!--页面主结构开始-->
		<div id="app" class="mui-views">
			<div class="mui-view">
				<div class="mui-navbar">
				</div>
				<div class="mui-pages">
				</div>
			</div>
		</div>
		<!--页面主结构结束-->
		<!--单页面开始-->
		<div id="setting" class="mui-page">
			<!--页面标题栏开始-->
			<div class="mui-navbar-inner mui-bar mui-bar-nav">
				<button type="button" class="mui-left mui-action-back mui-btn  mui-btn-link mui-btn-nav mui-pull-left mui-pull-left_style">
					<span class="mui-icon mui-icon-left-nav"></span>
				</button>
				<h1 class="mui-center mui-title mui-title_fff">个人信息</h1>
			</div>
			<!--页面标题栏结束-->
			<!--页面主内容区开始-->
			<div class="mui-page-content">
				<div class="mui-scroll-wrapper">
					<div class="mui-scroll">
						<ul class="mui-table-view mui-table-view-chevron">
							<li class="mui-table-view-cell mui-media">
								<a class="mui-navigate-right">
									<div class="mui-pull-right_name right_name_head-img1">
										<img class="head-img mui-action-preview" id="head-img1" src="img/touxiang.png">
									</div>
								</a>
							</li>
							<li class="mui-table-view-cell mui-media">
								<a class="mui-navigate-right">
									<div class="mui-media-body">
										昵称
									</div>
									<div class="mui-pull-right_name" id="nickname">未知</div>
								</a>
							</li>
							<li class="mui-table-view-cell mui-media">
								<a class="mui-navigate-right"">
									<div class="mui-media-body">
										性别
									</div>
									<div class="mui-pull-right_name" id="userResult">未知</div>
								</a>
							</li>
							<li class="mui-table-view-cell">
								<a class="mui-navigate-right">
									<div class="mui-media-body">
										律师资格证号
									</div>
									<div class="mui-pull-right_name" id="certificate">未知</div>
								</a>
							</li>
							<li class="mui-table-view-cell">
								<a class="mui-navigate-right">
									<div class="mui-media-body">
										所在地区
									</div>
									<div class="mui-pull-right_name" id="cityResult3">未知</div>
								</a>
							</li>
						</ul>
						<ul class="mui-table-view mui-table-view-chevron">
							<li class="mui-table-view-cell">
								<a class="mui-navigate-right">
									<div class="mui-media-body">
										身份证号
									</div>
									<div class="mui-pull-right_name" id="IDnumber">未知</div>
								</a>
							</li>
							<li class="mui-table-view-cell">
								<a class="mui-navigate-right">
									<div class="mui-media-body">
										银行卡号
									</div>
									<div class="mui-pull-right_name" id="Card">未知</div>
								</a>
							</li>
							<li class="mui-table-view-cell">
								<a class="mui-navigate-right">
									<div class="mui-media-body">
										开  户  行
									</div>
									<div class="mui-pull-right_name" id="account">未知</div>
								</a>
							</li>
							<li class="mui-table-view-cell">
								<a class="mui-navigate-right">
									<div class="mui-media-body">
										开  户  名
									</div>
									<div class="mui-pull-right_name" id="account_name">未知</div>
								</a>
							</li>
						</ul>
						<center>
							<button onclick="commit()">注  销</button>
						</center>
					</div>
				</div>
			</div>
			<!--页面主内容区结束-->
		</div>

	</body>
	<script src="js/index.js"></script>
	<script src="js/mui.min.js "></script>
	<script src="js/jquery-1.9.0.js"></script>
	<script src="js/mui.view.js "></script>
	<script src='js/feedback.js'></script>
	<script src="js/mui.picker.js"></script>
	<script src="js/mui.poppicker.js"></script>
	<script src="js/city.data.js" type="text/javascript" charset="utf-8"></script>
	<script src="js/city.data-3.js" type="text/javascript" charset="utf-8"></script>
	<script>
		//初始化单页view
		var viewApi = mui('#app').view({
			defaultPage: '#setting'
		});
		//初始化单页的区域滚动
		mui('.mui-scroll-wrapper').scroll();
		
		var phoneNum = localStorage.getItem("phoneNum");
		var imgPath = localStorage.getItem("imgPath");
		getImage(phoneNum);
		function getImage(id) {
			var url = get_url() + '/register/lawyer/photo/' + id;
			$.ajax({
				method: "get",
				url: url,
				dataType: 'jsonp', //加入这个选项即可
				jsonp: "jsonpcallback",
				success: function(json) {
					if(json.imgPath != ""){
						$("#chosedImage").attr('src', "http://101.201.42.91:8083" + json.imgPath);
					}else{
						$("#chosedImage").attr('src', "touxiang.png");
					}
				}
				//error: function(jqXHR, textStatus, errorThrown) {}
			});
		}
		
		var view = viewApi.view;
		(function($) {
			//处理view的后退与webview后退
			var oldBack = $.back;
			$.back = function() {
				if (viewApi.canBack()) { //如果view可以后退，则执行view的后退
					viewApi.back();
				} else { //执行webview后退
					oldBack();
				}
			};
			//监听页面切换事件方案1,通过view元素监听所有页面切换事件，目前提供pageBeforeShow|pageShow|pageBeforeBack|pageBack四种事件(before事件为动画开始前触发)
			//第一个参数为事件名称，第二个参数为事件回调，其中e.detail.page为当前页面的html对象
			view.addEventListener('pageBeforeShow', function(e) {
				//				console.log(e.detail.page.id + ' beforeShow');
			});
			view.addEventListener('pageShow', function(e) {
				//				console.log(e.detail.page.id + ' show');
			});
			view.addEventListener('pageBeforeBack', function(e) {
				//				console.log(e.detail.page.id + ' beforeBack');
			});
			view.addEventListener('pageBack', function(e) {
				//				console.log(e.detail.page.id + ' back');
			});
		})(mui);
		
//		<!--mui.plusReady(function(){
//			//获取参数
//			var user_touxiang = localStorage.getItem("user_touxiang");//头像
//			var nickname = localStorage.getItem("nickname");//昵称
//			var userResult = localStorage.getItem("userResult");//性别
//			var certificate = localStorage.getItem("certificate");//修改律师资格证号
//			var cityResult3 = localStorage.getItem("cityResult3");//所在地区
//			var IDnumber = localStorage.getItem("IDnumber");//身份证号
//			var Card = localStorage.getItem("Card");//银行卡号
//			var account = localStorage.getItem("account");//开户行
//			var account_name = localStorage.getItem("account_name");//开户名
//			document.getElementById("head-img1").src = user_touxiang;
//			document.getElementById("nickname").innerHTML = nickname;
//			document.getElementById("userResult").innerHTML = userResult;
//			document.getElementById("certificate").innerHTML = certificate;
//			document.getElementById("cityResult3").innerHTML = cityResult3;
//			document.getElementById("IDnumber").innerHTML = IDnumber;
//			document.getElementById("Card").innerHTML = Card;
//			document.getElementById("account").innerHTML = account;
//			document.getElementById("account_name").innerHTML = account_name;
//			
//			mui("center").on("tap", "button", function() {
//				localStorage.removeItem("user_touxiang");//头像
//				localStorage.removeItem("nickname");//昵称
//				localStorage.removeItem("userResult");//性别
//				localStorage.removeItem("certificate");//修改律师资格证号
//				localStorage.removeItem("cityResult3");//所在地区
//				localStorage.removeItem("IDnumber");//身份证号
//				localStorage.removeItem("Card");//银行卡号
//				localStorage.removeItem("account");//开户行
//				localStorage.removeItem("account_name");//开户名
//				mui.toast("已注销");
//				
//			});
//		});-->
		
		var phoneNum = "";
		mui.plusReady(function(){
			phoneNum = localStorage.getItem("phoneNum");
			getInformation();
			getImage(phoneNum);
		});
		$('#back').click(function(){
			history.go(-1);
		});
		function getInformation(){
			var url = get_url() + 'register/lawyer/read/' + phoneNum;
			$.ajax({
			   type: "POST",
				url: url,
				dataType: 'JSONP', //加入这个选项即可
				data: {},
				jsonp: "jsonpcallback",
				jsonpCallback: "OnGetMemberSuccessByjsonp",
				beforeSend: function(xhr) {},
			   success: function (json) {
			   	document.getElementById("head-img1").src = my_get_url() + json.imgPath;
				document.getElementById("nickname").innerHTML = json.NICKNAME;
				document.getElementById("userResult").innerHTML = json.SEX;
				document.getElementById("certificate").innerHTML = json.ZYZNUM;
				document.getElementById("cityResult3").innerHTML = json.AREA;
				document.getElementById("IDnumber").innerHTML = json.ACCOUNT;
				document.getElementById("Card").innerHTML = json.IDCARD;
				document.getElementById("account").innerHTML = json.ACCOUNTBANK;
				document.getElementById("account_name").innerHTML = json.USERNAME;		 
			   },
			   error: function (jqXHR, textStatus, errorThrown) {
			   }
			});
		}
	    function commit(){
			mui.plusReady(function(){
				phoneNum = localStorage.removeItem("phoneNum");
			    var nwaiting = plus.nativeUI.showWaiting();//显示原生等待框  
			    webviewShow = plus.webview.create("home.html");//后台创建webview并打开show.html  
			    webviewShow.addEventListener("loaded", function() { //注册新webview的载入完成事件  
					mui.toast("注销成功！");
			        nwaiting.close(); //新webview的载入完毕后关闭等待框  
			        webviewShow.show("slide-in-right",300); //把新webview窗体显示出来，显示动画效果为速度300毫秒的右侧移入动画  
			    }, false);  
		    });
	    }
	    function getImage(id) {
			var url = get_url() + '/register/lawyer/photo/' + id;
			$.ajax({
				method: "get",
				url: url,
				dataType: 'jsonp', //加入这个选项即可
				jsonp: "jsonpcallback",
				success: function(json) {
					if(json.imgPath != ""){
						$("#chosedImage").attr('src', "http://101.201.42.91:8083" + json.imgPath);
					}else{
						$("#chosedImage").attr('src', "touxiang.png");
					}
				}
				//error: function(jqXHR, textStatus, errorThrown) {}
			});
		}
		
	</script>

</html>